package org.polyforms.repository.strategy.support;

import javax.inject.Named;

import org.polyforms.repository.Repository;
import org.polyforms.repository.strategy.RepositoryMatchingStrategy;

/**
 * Strategy of finding repository inheriting {@link Repository}.
 * 
 * @author Kuisong Tong
 * @since 1.0
 */
@Named
public final class InheritedRepositoryMatchingStrategy implements RepositoryMatchingStrategy {
    /**
     * {@inheritDoc}
     */
    public boolean matches(final Class<?> candidate) {
        return Repository.class.isAssignableFrom(candidate);
    }
}
